package com.broada.apm.entity;

import java.util.Date;
import java.util.List;

/**
 * 
 * @author zhangli Create By 2015年5月28日 下午1:40:28
 */
public class SystemInfo {
	private APM apm;//APM系统信息
	
	private OSInfo osInfo;//系统信息
	
	private Network network;//网络信息
	
	private SystemTime systemTime;//系统时间信息
	
	public APM getApm() {
		return apm;
	}

	public void setApm(APM apm) {
		this.apm = apm;
	}

	public OSInfo getOsInfo() {
		return osInfo;
	}

	public void setOsInfo(OSInfo osInfo) {
		this.osInfo = osInfo;
	}

	public Network getNetwork() {
		return network;
	}

	public void setNetwork(Network network) {
		this.network = network;
	}

	public SystemTime getSystemTime() {
		return systemTime;
	}

	public void setSystemTime(SystemTime systemTime) {
		this.systemTime = systemTime;
	}

	public class APM {
		private String version;//版本
		private String licenseInfo;//许可信息
		
		public String getVersion() {
			return version;
		}
		public void setVersion(String version) {
			this.version = version;
		}
		public String getLicenseInfo() {
			return licenseInfo;
		}
		public void setLicenseInfo(String licenseInfo) {
			this.licenseInfo = licenseInfo;
		}
	}
	
	/**
	 * 操作系统信息
	 */
	public class OSInfo {
		private String hostName;//主机名
		private Processor processor;//处理器
		private Memory memory;//内存
		private Disk systemDisk;//系统盘
		private Disk dataDisk;//磁盘
		
		
		public String getHostName() {
			return hostName;
		}

		public void setHostName(String hostName) {
			this.hostName = hostName;
		}

		public Processor getProcessor() {
			return processor;
		}

		public void setProcessor(Processor processor) {
			this.processor = processor;
		}

		public Memory getMemory() {
			return memory;
		}

		public void setMemory(Memory memory) {
			this.memory = memory;
		}

		public Disk getSystemDisk() {
			return systemDisk;
		}

		public void setSystemDisk(Disk systemDisk) {
			this.systemDisk = systemDisk;
		}

		public Disk getDataDisk() {
			return dataDisk;
		}

		public void setDataDisk(Disk dataDisk) {
			this.dataDisk = dataDisk;
		}

		/**
		 * 处理器
		 */
		public class Processor {
			private String info;
			private double avgload;//负荷
			
			public String getInfo() {
				return info;
			}
			public void setInfo(String info) {
				this.info = info;
			}
			public double getAvgload() {
				return avgload;
			}
			public void setAvgload(double avgload) {
				this.avgload = avgload;
			}
		}
		
		/**
		 * 内存
		 */
		public class Memory {
			private double total;
			private double used;//已使用
			private double usage;//使用率
			
			public double getTotal() {
				return total;
			}
			public void setTotal(double total) {
				this.total = total;
			}
			public double getUsed() {
				return used;
			}
			public void setUsed(double used) {
				this.used = used;
			}
			public double getUsage() {
				return usage;
			}
			public void setUsage(double usage) {
				this.usage = usage;
			}
		}
		
		/**
		 * 磁盘
		 */
		public class Disk {
			private double total;
			private double used;//已使用
			private double usage;//使用率
			
			public double getTotal() {
				return total;
			}
			public void setTotal(double total) {
				this.total = total;
			}
			public double getUsed() {
				return used;
			}
			public void setUsed(double used) {
				this.used = used;
			}
			public double getUsage() {
				return usage;
			}
			public void setUsage(double usage) {
				this.usage = usage;
			}
		}
	}
	
	public class Network {
		private ManagerInterface managerInterface;
		private List<MonitorInterface> monitorInterfaces;
		
		public ManagerInterface getManagerInterface() {
			return managerInterface;
		}

		public void setManagerInterface(ManagerInterface managerInterface) {
			this.managerInterface = managerInterface;
		}

		public List<MonitorInterface> getMonitorInterfaces() {
			return monitorInterfaces;
		}

		public void setMonitorInterfaces(List<MonitorInterface> monitorInterfaces) {
			this.monitorInterfaces = monitorInterfaces;
		}

		public class ManagerInterface {
			private String name;//网络管理接口名称
			private String ip;//IP地址
			private String netmask;//掩码
			private String gateway;//网关
			private String dns;//服务器
			
			public String getName() {
				return name;
			}
			public void setName(String name) {
				this.name = name;
			}
			public String getIp() {
				return ip;
			}
			public void setIp(String ip) {
				this.ip = ip;
			}
			public String getNetmask() {
				return netmask;
			}
			public void setNetmask(String netmask) {
				this.netmask = netmask;
			}
			public String getGateway() {
				return gateway;
			}
			public void setGateway(String gateway) {
				this.gateway = gateway;
			}
			public String getDns() {
				return dns;
			}
			public void setDns(String dns) {
				this.dns = dns;
			}
		}
		
		public class MonitorInterface {
			private String name;//网络监控接口名称
			private long rxPackage;//已接收
			private double rxPackageRate;//收包速率
			private long rxByte;//接收字节
			private double rxByteRate;//接收速率
			public String getName() {
				return name;
			}
			public void setName(String name) {
				this.name = name;
			}
			public long getRxPackage() {
				return rxPackage;
			}
			public void setRxPackage(long rxPackage) {
				this.rxPackage = rxPackage;
			}
			public double getRxPackageRate() {
				return rxPackageRate;
			}
			public void setRxPackageRate(double rxPackageRate) {
				this.rxPackageRate = rxPackageRate;
			}
			public long getRxByte() {
				return rxByte;
			}
			public void setRxByte(long rxByte) {
				this.rxByte = rxByte;
			}
			public double getRxByteRate() {
				return rxByteRate;
			}
			public void setRxByteRate(double rxByteRate) {
				this.rxByteRate = rxByteRate;
			}
		}
	}
	
	public class SystemTime {
		private long date;
		private Date time;
		private String syncServer;
		private int status;
		
		public long getDate() {
			return date;
		}
		public void setDate(long date) {
			this.date = date;
		}
		public Date getTime() {
			return time;
		}
		public void setTime(Date time) {
			this.time = time;
		}
		public String getSyncServer() {
			return syncServer;
		}
		public void setSyncServer(String syncServer) {
			this.syncServer = syncServer;
		}
		public int getStatus() {
			return status;
		}
		public void setStatus(int status) {
			this.status = status;
		}
	}
}
